package cn.util;

import java.util.Date;

/**
 * @author jia
 * @Description
 * @date 2019-03-21-9:36
 */
public class DateUtil {
    public static java.sql.Date d2t(Date d) {
        if (null == d) {
            return null;
        }
        return new java.sql.Date(d.getTime());
    }

    public static java.util.Date t2d(java.sql.Timestamp t) {
        if (null == t) {
            return null;
        }
        return new java.util.Date(t.getTime());
    }
}
